package com.blueocean_health.care.management.domain.dto;

import java.text.SimpleDateFormat;
import java.util.Date;

import com.blueocean_health.care.management.common.base.em.TimeType;
import com.blueocean_health.care.management.common.base.string.StringUtils;
import com.blueocean_health.care.management.common.base.time.TimeUtils;
import com.blueocean_health.care.management.common.excel.ExcelResources;

/**
 * 订单流水返回数据实体  2017年8月23日17:26:52
 * 修改时间 2018年4月12日16:49:16
 * @author wuyanli
 *
 */
public class OrderFlowDto {
	//订单Id
	private String orderId;
	private String feeType;
	//收入类型
	private String feeName;
	private String transType;
	//资金类型
	private String transName;
	//金额
	private String amount;
	//发生时间
	private Date time;
	//开据日期
	private Date billingTime;
	//关联收据编号
	private String receiptNumber;
	//签单人
	private String userName;
	//提成
	private String totalPay;
	//护理员
	private String workerName;
	//时间类型 1:24小时  2：12小时制
	private String timeType;
	//时间类型 1:24小时  2：12小时制
	private String timeTypeName;
	
	
	@ExcelResources(title = "时间类型", order = 3)
	public String getTimeTypeName() {
		return timeTypeName;
	}
	public void setTimeTypeName(String timeTypeName) {
		this.timeTypeName = timeTypeName;
	}
	
	public String getTimeType() {
		return timeType;
	}
	public void setTimeType(String timeType) {
		this.timeType = timeType;
	}
	@ExcelResources(title = "签单人", order = 7)
	public String getUserName() {
		return userName;
	}
	public void setUserName(String userName) {
		this.userName = userName;
	}
	@ExcelResources(title = "提成", order = 5,isNum = 1)
	public String getTotalPay() {
		return totalPay;
	}
	public void setTotalPay(String totalPay) {
		this.totalPay = totalPay;
	}
	@ExcelResources(title = "护工/小组", order = 4)
	public String getWorkerName() {
		return workerName;
	}
	public void setWorkerName(String workerName) {
		this.workerName = workerName;
	}
	@ExcelResources(title = "开据日期", order = 1)
	 public String getBillingTime() {
    	if(StringUtils.isEmpty(billingTime)){
    		return null;
    	}
		return TimeUtils.getStringByDate(billingTime, TimeType.yyyy_MM_dd);
	}
	public void setBillingTime(Date billingTime) {
		this.billingTime = billingTime;
	}
	public String getFeeType() {
		return feeType;
	}
	public void setFeeType(String feeType) {
		this.feeType = feeType;
	}
	public String getTransType() {
		return transType;
	}
	public void setTransType(String transType) {
		this.transType = transType;
	}
	@ExcelResources(title = "关联订单号", order = 11)
	public String getOrderId() {
		return orderId;
	}
	public void setOrderId(String orderId) {
		this.orderId = orderId;
	}
	@ExcelResources(title = "订单类型", order = 8)
	public String getFeeName() {
		return feeName;
	}
	public void setFeeName(String feeName) {
		this.feeName = feeName;
	}
	@ExcelResources(title = "支付方式", order = 9)
	public String getTransName() {
		return transName;
	}
	public void setTransName(String transName) {
		this.transName = transName;
	}
	@ExcelResources(title = "关联收据编号", order = 6)
	public String getReceiptNumber() {
		return receiptNumber;
	}
	public void setReceiptNumber(String receiptNumber) {
		this.receiptNumber = receiptNumber;
	}
	@ExcelResources(title = "收据金额", order = 2,isNum=1)
	public String getAmount() {
		return amount;
	}
	public void setAmount(String amount) {
		this.amount = amount;
	}
	@ExcelResources(title = "提交时间", order = 10)
	public String getTime() {
		SimpleDateFormat df = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");//设置日期格式
		if(StringUtils.isEmpty(time)){
			return null;
		}
		return df.format(time);
	}
	public void setTime(Date time) {
		this.time = time;
	}
	@Override
	public String toString() {
		return "OrderFlowDto [orderId=" + orderId + ", feeType=" + feeType + ", feeName=" + feeName + ", transType="
				+ transType + ", transName=" + transName + ", amount=" + amount + ", time=" + time + ", billingTime="
				+ billingTime + ", receiptNumber=" + receiptNumber + ", userName=" + userName + ", totalPay=" + totalPay
				+ ", workerName=" + workerName + "]";
	}
	
}
